package com.zzyl.nursing.service;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;

import com.huaweicloud.sdk.iotda.v5.model.ServiceCapability;
import com.zzyl.nursing.domain.Device;
import com.baomidou.mybatisplus.extension.service.IService;
import com.zzyl.nursing.dto.DeviceDto;
import com.zzyl.nursing.vo.DeviceDetailVo;
import com.zzyl.nursing.vo.ProductVo;

/**
 * 智能设备Service接口
 * 
 * @author elina
 * @date 2025-10-13
 */
public interface IDeviceService extends IService<Device>
{
    /**
     * 查询智能设备
     * 
     * @param id 智能设备主键
     * @return 智能设备
     */
    public Device selectDeviceById(Long id);

    /**
     * 查询智能设备列表
     * 
     * @param device 智能设备
     * @return 智能设备集合
     */
    public List<Device> selectDeviceList(Device device);

    /**
     * 修改智能设备
     * 
     * @param deviceDto 智能设备
     * @return 结果
     */
    public int updateDevice(DeviceDto deviceDto);


    void syncProductList();

    List<ProductVo> getAllProducts();

    void registerDevice(DeviceDto deviceDto);

    DeviceDetailVo detail(String iotId);

    ArrayList<HashMap<String, Object>> queryServiceProperties(String iotId);

    /**
     * 删除设备
     * @param iotId
     */
    void deleteDeviceByIotId(String iotId);

    /**
     * 查询产品详情
     *
     * @param productKey
     * @return
     */
    List<ServiceCapability> queryProduct(String productKey);
}
